home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _E2EB6112F3234A29BECEFE4368AF7D93 < prev    next >
Encoding:
Text File  |  2004-01-06  |  6.9 KB  |  197 lines

  1. --------------------------------------------------
  2. --    Created By: Petar
  3. --   Description: <short_description>
  4. --------------------------
  5. --
  6.  
  7. AIBehaviour.CoverBlackIdle = {
  8.     Name = "CoverBlackIdle",
  9.  
  10.     -- SYSTEM EVENTS            -----
  11.     ---------------------------------------------
  12.     OnSelected = function( self, entity )    
  13.     end,
  14.     ---------------------------------------------
  15.     OnSpawn = function( self, entity )
  16.         -- called when enemy spawned or reset
  17.     end,
  18.     ---------------------------------------------
  19.     OnActivate = function( self, entity )
  20.         -- called when enemy receives an activate event (from a trigger, for example)
  21.     end,
  22.     ---------------------------------------------
  23.     OnNoTarget = function( self, entity )
  24.         -- called when the enemy stops having an attention target
  25.     end,
  26.     ---------------------------------------------
  27.     OnPlayerSeen = function( self, entity, fDistance )
  28.         -- called when the enemy sees a living player
  29.         AI:Signal(SIGNALFILTER_SUPERGROUP,1,"MEMBER_CONTACT",entity.id);
  30.         if (entity.Covering) then
  31.             entity:SelectPipe(0,"just_shoot");
  32.         end
  33.  
  34.     end,
  35.     ---------------------------------------------
  36.     OnEnemySeen = function( self, entity )
  37.         -- called when the enemy sees a foe which is not a living player
  38.     end,
  39.     ---------------------------------------------
  40.     OnFriendSeen = function( self, entity )
  41.         -- called when the enemy sees a friendly target
  42.     end,
  43.     ---------------------------------------------
  44.     OnDeadBodySeen = function( self, entity )
  45.         -- called when the enemy a dead body
  46.     end,
  47.     ---------------------------------------------
  48.     OnEnemyMemory = function( self, entity )
  49.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  50.     end,
  51.     ---------------------------------------------
  52.     OnInterestingSoundHeard = function( self, entity )
  53.         -- called when the enemy hears an interesting sound
  54.     end,
  55.     ---------------------------------------------
  56.     OnThreateningSoundHeard = function( self, entity )
  57.         -- called when the enemy hears a scary sound
  58.     end,
  59.     ---------------------------------------------
  60.     OnReload = function( self, entity )
  61.         -- called when the enemy goes into automatic reload after its clip is empty
  62.     end,
  63.     ---------------------------------------------
  64.     OnGroupMemberDied = function( self, entity )
  65.         -- called when a member of the group dies
  66.     end,
  67.     OnGroupMemberDiedNearest = function ( self, entity, sender)
  68.         AIBehaviour.DEFAULT:OnGroupMemberDiedNearest(entity,sender);
  69.     end,
  70.     ---------------------------------------------
  71.     OnNoHidingPlace = function( self, entity, sender )
  72.         -- called when no hiding place can be found with the specified parameters
  73.         if (entity.UpdatedHide == nil) then
  74.             entity:InsertSubpipe(0,"hide_forward");
  75.             entity.UpdatedHide = 1;
  76.         end
  77.     end,    
  78.     ---------------------------------------------
  79.     OnReceivingDamage = function ( self, entity, sender)
  80.         -- called when the enemy is damaged
  81.         if (entity.Covering) then    
  82.             entity:SelectPipe(0,"cover_scramble");
  83.         end
  84.     end,
  85.     ---------------------------------------------
  86.     OnCoverRequested = function ( self, entity, sender)
  87.         -- called when the enemy is damaged
  88.     end,
  89.     ---------------------------------------------
  90.     OnBulletRain = function ( self, entity, sender)
  91.         
  92.     end,
  93.  
  94.  
  95.     COVER_NORMALATTACK = function (self, entity, sender)
  96. --        local attack_pipe = NOCOVER.GetPipe();
  97. --        entity:SelectPipe(0,"cover_close_wrapper");
  98. --        entity:InsertSubpipe(0,attack_pipe);
  99.     end,
  100.  
  101.  
  102.  
  103.     SELECT_RED = function (self, entity, sender)
  104.     end,
  105.     SELECT_BLACK = function (self, entity, sender)
  106.     end,
  107.  
  108.  
  109.     --------------------------------------------------
  110.     HEADS_UP_GUYS = function (self, entity, sender)
  111.         entity.RunToTrigger = 1;
  112.     end,
  113.     ---------------------------------------------
  114.     INCOMING_FIRE = function (self, entity, sender)
  115.     end,
  116.  
  117.     -- GROUP SIGNALS
  118.     ---------------------------------------------    
  119.     FORM_RED = function (self, entity, sender)
  120.         -- the team leader wants everyone to keep formation
  121.     
  122.     end,
  123.     ---------------------------------------------    
  124.     FORM_BLACK = function (self, entity, sender)
  125.         -- the team leader wants everyone to keep formation
  126.         entity.Covering = nil;
  127.         System:LogToConsole("-------------------------------------- FORM BLACK -------------------------");
  128.         entity:SelectPipe(0,"look_at_beacon");
  129.         entity:InsertSubpipe(0,"cover_black_form");
  130.         if (entity.AI_GunOut==nil) then 
  131.             entity:InsertSubpipe(0,"DRAW_GUN");
  132.         end
  133.     end,
  134.     ---------------------------------------------    
  135.     KEEP_FORMATION = function (self, entity, sender)
  136.         -- the team leader wants everyone to keep formation
  137.     end,
  138.     ---------------------------------------------    
  139.     BREAK_FORMATION = function (self, entity, sender)
  140.         -- the team can split
  141.         entity:SelectPipe(0,"cover_scramble");
  142.     end,
  143.     ---------------------------------------------    
  144.     SINGLE_GO = function (self, entity, sender)
  145.         -- the team leader has instructed this group member to approach the enemy
  146.     end,
  147.     ---------------------------------------------    
  148.     BLACK_COVER = function (self, entity, sender)
  149.         entity:TriggerEvent(AIEVENT_CLEAR);
  150.         entity:SelectPipe(0,"dumb_shoot");
  151.     end,
  152.     ---------------------------------------------    
  153.     RED_IN_POSITION = function (self, entity, sender)
  154.         -- some member of the group is safely in position
  155.     end,
  156.     ---------------------------------------------    
  157.     BLACK_IN_POSITION = function (self, entity, sender)
  158.     --    -- some member of the group is safely in position
  159.         if (entity==sender) then
  160.             entity.Covering=1;
  161. --            local attack_pipe = NOCOVER.GetPipe();
  162. --            entity:SelectPipe(0,"cover_close_wrapper");
  163. --            entity:InsertSubpipe(0,attack_pipe);
  164.         end
  165.     end,
  166.     ---------------------------------------------    
  167.     GROUP_SPLIT = function (self, entity, sender)
  168.         -- team leader instructs group to split
  169.     end,
  170.     ---------------------------------------------    
  171.     PHASE_RED_ATTACK = function (self, entity, sender)
  172.         -- team leader instructs red team to attack
  173.     end,
  174.     ---------------------------------------------    
  175.     PHASE_BLACK_ATTACK = function (self, entity, sender)
  176.         -- team leader instructs black team to attack
  177.         entity.Covering = nil;
  178.         entity.UpdatedHide = nil;
  179.         entity:SelectPipe(0,"black_cover_pindown");
  180.     end,
  181.     ---------------------------------------------    
  182.     GROUP_MERGE = function (self, entity, sender)
  183.         -- team leader instructs groups to merge into a team again
  184.     end,
  185.     ---------------------------------------------    
  186.     CLOSE_IN_PHASE = function (self, entity, sender)
  187.         -- team leader instructs groups to initiate part one of assault fire maneuver
  188.     end,
  189.     ---------------------------------------------    
  190.     ASSAULT_PHASE = function (self, entity, sender)
  191.         -- team leader instructs groups to initiate part one of assault fire maneuver
  192.     end,
  193.     ---------------------------------------------    
  194.     GROUP_NEUTRALISED = function (self, entity, sender)
  195.         -- team leader instructs groups to initiate part one of assault fire maneuver
  196.     end,
  197. }